<!DOCTYPE html>
<html lang="cn">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style type="text/css"></style>
</head>
<body>
    <h1>JS内置对象 -- Number</h1>
    <hr>

    <script>
        console.log('可表示的最大的数值: ', Number.MAX_VALUE);
        console.log('可表示的最小的数值: ', Number.MIN_VALUE);

        var n = 100.00987;

        console.log(n.toString());
        console.log(typeof(n.toString()));
        console.log(n.toString(2));
        console.log(n.toString(8));
        console.log(n.toString(16));
        console.log(n.toString(5));
        console.log(n.toString(7));
        console.log(n.toString(9));

        // 保留指定小数位数
        console.log(n.toFixed());
        console.log(n.toFixed(2));
        console.log(n.toFixed(3));

    </script>
</body>
</html>